
import typescript from 'rollup-plugin-typescript';
import  dts from 'rollup-plugin-dts'
import babel from 'rollup-plugin-babel';

export default [{
  input: './src/index.ts',
  output: [{
    // 核心选项
    file: './lib/cjs.js', 
    name: 'micro',
    format: 'cjs'
  }, {
    // 核心选项
    file: './lib/es.js', 
    name: 'micro',
    format: 'es'
  }, {
    // 核心选项
    file: './lib/umd.js',    
    name: 'micro',
    format: 'umd'
  },],
  plugins: [
    typescript(),  // 会自动读取 文件tsconfig.json配置
    babel(),
  ]
},
{
  input: './src/index.ts',
  output: [{
    file: './lib/umd.d.ts',   
    format: 'es'
  }],
  plugins: [dts()]
}
]
